//
//  welcomeViewController.m
//  Model
//
//  Created by apple on 2018/7/10.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "welcomeViewController.h"
#import "ChoiceLoginViewController.h"
@interface welcomeViewController ()

@end

@implementation welcomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIImageView *imgView = [[UIImageView alloc] init];
    [self.view addSubview:imgView];
    [imgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view);
        make.left.equalTo(self.view);
        make.right.equalTo(self.view);
        make.bottom.equalTo(self.view);
        
    }];
    if (KIsiPhoneX) {
        //xxxx
    
        imgView.image = [UIImage imageNamed:@"xxxx"];
    }else{
       
        imgView.image = [UIImage imageNamed:@"bg_welcometomodelapp"];
    }
    
    imgView.userInteractionEnabled  = YES;
    UIButton *kaiShiBtn = [[UIButton alloc] init];
    [imgView addSubview:kaiShiBtn];
    [kaiShiBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.bottom.equalTo(self.view).with.offset(-65);
        make.height.offset(30);
        make.width.offset(120);
        
    }];
    [kaiShiBtn setTitle:@"立即体验" forState:UIControlStateNormal];
    kaiShiBtn.titleLabel.font = [UIFont systemFontOfSize:15];
    [kaiShiBtn setTitleColor:getColor(@"ff40c6") forState:UIControlStateNormal];
    kaiShiBtn.layer.cornerRadius = 15;
    kaiShiBtn.layer.masksToBounds = YES;
    kaiShiBtn.backgroundColor = [UIColor whiteColor];
    [kaiShiBtn addTarget:self action:@selector(kaiShiClick) forControlEvents:UIControlEventTouchUpInside];
    
    
    // Do any additional setup after loading the view from its nib.
}

- (void)kaiShiClick{
    
    ChoiceLoginViewController *vc = [[ChoiceLoginViewController alloc] init];
    
    [self presentViewController:vc animated:YES completion:^{
        
    }];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
